import request from '@/utils/request'
import qs from 'qs'

export function withdrawRecord(iDisplayStart, iDisplayLength, fromtime, totime, status, phone, username) {
  const data = {
    iDisplayStart,
    iDisplayLength,
    fromtime,
    totime,
    status,
    phone,
    username
  }
  return request({
    url: `/admin/withdraw/find`,
    method: 'post',
    data: qs.stringify(data)
  })
}
export function withdrawConfirm(status, withdrawAmount, withdrawid, remarks) {
  const data = {
    status,
    withdrawAmount,
    withdrawid,
    remarks
  }
  return request({
    url: `/admin/withdraw/update`,
    method: 'post',
    data: qs.stringify(data)
  })
}

export function orderList(iDisplayStart, iDisplayLength, ordername, userid, phone, paytype, infotype, ordertype, releasecity, fromtime, totime) {
  const data = {
    iDisplayStart,
    iDisplayLength,
    ordername,
    userid,
    phone,
    paytype,
    infotype,
    ordertype,
    releasecity,
    fromtime,
    totime
  }
  return request({
    url: `/admin/order/find`,
    method: 'post',
    data: qs.stringify(data)
  })
}
export function commission(username, phone, userlevel, fromtime, totime, isagency, iDisplayStart, iDisplayLength) {
  const data = {
    username,
    phone,
    userlevel,
    fromtime,
    totime,
    isagency,
    iDisplayStart,
    iDisplayLength
  }
  return request({
    url: `/admin/commission/find`,
    method: 'post',
    data: qs.stringify(data)
  })
}
